package com.yh.hljapp.gddb.gdbean;

import org.greenrobot.greendao.DaoException;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.NotNull;
import org.greenrobot.greendao.annotation.ToOne;

/**
 * =========================
 * 版权所有，违法必究
 * 作者：zhanghang
 * <p>
 * 工程：hlj
 * <p>
 * 文件名：Add_Sync_Bean
 * <p>
 * 创建时间：2017.08.01.9:33
 */
@Entity
public class Add_body_Bean {

    //    "ItemList": [
//    {
//        "id": "443",
//            "model": null,
//            "name": "变压器",
//            "number": "91.001",
//            "unit_name": "个",
//            "unit_id": "218",
//            "unitgroup_name": "6数量组",
//            "unitgroup_id": "217",
//            "defunitId": "218",
//            "baseunit": "225",
//            "baseName": "PCS"
//    }]
    @Id(autoincrement = true)
    private Long ids;

    private String id;
    public String userName;

    private String model;
    private String name;
    private String number;
    private String unit_name;
    private String unit_id;
    private String unitgroup_name;
    private String unitgroup_id;
    private String defunitId;
    private String baseunit;
    private String baseName;
    private String FBillNum;

    private String count;
    private String FDCStockName;
    private String FDCStockID;

    private String TDCStockName;
    private String TDCStockID;

    public long headId;
    @ToOne(joinProperty = "headId")
    private AddSaleInt_HeadBean head;

    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    @Generated(hash = 354738830)
    private transient Add_body_BeanDao myDao;
    @Generated(hash = 1063255294)
    public Add_body_Bean(Long ids, String id, String userName, String model, String name, String number,
            String unit_name, String unit_id, String unitgroup_name, String unitgroup_id,
            String defunitId, String baseunit, String baseName, String FBillNum, String count,
            String FDCStockName, String FDCStockID, String TDCStockName, String TDCStockID,
            long headId) {
        this.ids = ids;
        this.id = id;
        this.userName = userName;
        this.model = model;
        this.name = name;
        this.number = number;
        this.unit_name = unit_name;
        this.unit_id = unit_id;
        this.unitgroup_name = unitgroup_name;
        this.unitgroup_id = unitgroup_id;
        this.defunitId = defunitId;
        this.baseunit = baseunit;
        this.baseName = baseName;
        this.FBillNum = FBillNum;
        this.count = count;
        this.FDCStockName = FDCStockName;
        this.FDCStockID = FDCStockID;
        this.TDCStockName = TDCStockName;
        this.TDCStockID = TDCStockID;
        this.headId = headId;
    }
    @Generated(hash = 1431370563)
    public Add_body_Bean() {
    }
    public Long getIds() {
        return this.ids;
    }
    public void setIds(Long ids) {
        this.ids = ids;
    }
    public String getId() {
        return this.id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getUserName() {
        return this.userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getModel() {
        return this.model;
    }
    public void setModel(String model) {
        this.model = model;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getNumber() {
        return this.number;
    }
    public void setNumber(String number) {
        this.number = number;
    }
    public String getUnit_name() {
        return this.unit_name;
    }
    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }
    public String getUnit_id() {
        return this.unit_id;
    }
    public void setUnit_id(String unit_id) {
        this.unit_id = unit_id;
    }
    public String getUnitgroup_name() {
        return this.unitgroup_name;
    }
    public void setUnitgroup_name(String unitgroup_name) {
        this.unitgroup_name = unitgroup_name;
    }
    public String getUnitgroup_id() {
        return this.unitgroup_id;
    }
    public void setUnitgroup_id(String unitgroup_id) {
        this.unitgroup_id = unitgroup_id;
    }
    public String getDefunitId() {
        return this.defunitId;
    }
    public void setDefunitId(String defunitId) {
        this.defunitId = defunitId;
    }
    public String getBaseunit() {
        return this.baseunit;
    }
    public void setBaseunit(String baseunit) {
        this.baseunit = baseunit;
    }
    public String getBaseName() {
        return this.baseName;
    }
    public void setBaseName(String baseName) {
        this.baseName = baseName;
    }
    public String getCount() {
        return this.count;
    }
    public void setCount(String count) {
        this.count = count;
    }
    public String getFDCStockName() {
        return this.FDCStockName;
    }
    public void setFDCStockName(String FDCStockName) {
        this.FDCStockName = FDCStockName;
    }
    public String getFDCStockID() {
        return this.FDCStockID;
    }
    public void setFDCStockID(String FDCStockID) {
        this.FDCStockID = FDCStockID;
    }
    public String getTDCStockName() {
        return this.TDCStockName;
    }
    public void setTDCStockName(String TDCStockName) {
        this.TDCStockName = TDCStockName;
    }
    public String getTDCStockID() {
        return this.TDCStockID;
    }
    public void setTDCStockID(String TDCStockID) {
        this.TDCStockID = TDCStockID;
    }
    public long getHeadId() {
        return this.headId;
    }
    public void setHeadId(long headId) {
        this.headId = headId;
    }
    @Generated(hash = 80859862)
    private transient Long head__resolvedKey;
    /** To-one relationship, resolved on first access. */
    @Generated(hash = 1450010301)
    public AddSaleInt_HeadBean getHead() {
        long __key = this.headId;
        if (head__resolvedKey == null || !head__resolvedKey.equals(__key)) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            AddSaleInt_HeadBeanDao targetDao = daoSession
                    .getAddSaleInt_HeadBeanDao();
            AddSaleInt_HeadBean headNew = targetDao.load(__key);
            synchronized (this) {
                head = headNew;
                head__resolvedKey = __key;
            }
        }
        return head;
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 1031066784)
    public void setHead(@NotNull AddSaleInt_HeadBean head) {
        if (head == null) {
            throw new DaoException(
                    "To-one property 'headId' has not-null constraint; cannot set to-one to null");
        }
        synchronized (this) {
            this.head = head;
            headId = head.getId();
            head__resolvedKey = headId;
        }
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    public String getFBillNum() {
        return this.FBillNum;
    }
    public void setFBillNum(String FBillNum) {
        this.FBillNum = FBillNum;
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 365567998)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getAdd_body_BeanDao() : null;
    }



}
